home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.9 KB | 95 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: DrawView.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef DRAWVIEW_H
- #define DRAWVIEW_H
-
- // ----- Part Layer -----
-
- #ifndef FWSVIEW_H
- #include "FWSView.h"
- #endif
-
- //========================================================================================
- // Forward Declaration
- //========================================================================================
-
- class FW_CGraphicContext;
- class CDrawPart;
- class CDrawFrame;
- class CDrawSelection;
- class CDrawPartContent;
-
- //========================================================================================
- // Class CDrawView
- //========================================================================================
-
- class CDrawView : public FW_CSuperView
- {
- public:
- FW_DECLARE_CLASS
-
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
- virtual ~ CDrawView();
-
- private:
- CDrawView(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Cursor Adjustement
- virtual FW_Handled AdjustCursor(Environment *ev, ODFacet* facet, const FW_CPoint& where, ODEventInfo* eventInfo);
-
- // ----- Layout
- virtual void SizeChanged(Environment* ev, const FW_CPoint& oldSize);
- virtual void AdjustToNewLayout(Environment *ev,
- const FW_CPoint& oldExtent,
- const FW_CPoint& newExtent,
- FW_ERedrawVerb redraw);
-
- // ----- Drawing
- virtual void Draw(Environment *ev, ODFacet* odFacet, ODShape* invalidShape);
-
- // ----- Events -----
- virtual FW_Handled DoMouseDown(Environment *ev, const FW_CMouseEvent& theMouseEvent);
- virtual FW_Handled DoVirtualKey(Environment* ev, const FW_CVirtualKeyEvent& theVirtualKeyEvent);
-
- virtual FW_Boolean WantsToBeTarget(Environment* ev);
-
- // ----- Archiving -----
- static void* Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
- static void Destroy(void* object, FW_ClassTypeConstant type);
- virtual void Flatten(Environment* ev, FW_CWritableStream& stream) const;
- virtual void InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
-
- // ----- Scroll Notification -----
- virtual void InternalTransformChanged(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- protected:
- void DrawGrid(Environment *ev, FW_CGraphicContext& gc, const FW_CRect& invalidRect);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CDrawPart* fDrawPart;
- CDrawPartContent* fDrawPartContent;
- CDrawFrame* fDrawFrame;
- };
-
- #endif
-